<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateIntermediaryUserTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('intermediary_user', function (Blueprint $table) {
            $table->increments('id');
            $table->string('nickname')->nullable()->comment('昵称');
            $table->string('avatar')->nullable()->comment('头像');
            $table->string('password')->nullable()->comment('密码');
            $table->integer('company')->nullable()->comment('公司');
            $table->integer('old_house_num')->nullable()->comment('二手房数量');
            $table->integer('rent_house_num')->nullable()->comment('租房数量');
            $table->integer('new_house_num')->nullable()->comment('新房数量');
            $table->string('real_name')->nullable()->comment('真实姓名');
            $table->string('id_number')->nullable()->comment('身份证号码');
            $table->string('openid')->nullable();
            $table->string('session_key')->nullable();
            $table->char('mobile')->nullable()->comment('手机号码');
            $table->enum('gender')->nullable()->comment('性别');
            $table->tinyInteger('status')->default('1')->nullable()->comment('在职状态 0:离职,1:在职');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('intermediary_user');
    }
}
